using System;
using System.Collections.Generic;
using System.Text;
using Deepcode.Flux.Core.Services.FluxClient;
using Deepcode.Flux.Core.Services.Security;

namespace Deepcode.Flux.Core.UI
{
	/// <summary>
	/// The NonCachePage class is a base class for creating 
	/// pages that should force no caching (eg admin tools)
	/// </summary>
	public class NonCachePage : System.Web.UI.Page
	{
		/// <summary>
		/// OnLoad event sets the cacheability of the module page to not cacheable.
		/// </summary>
		/// <param name="e"></param>
		protected override void OnLoad(EventArgs e)
		{
			// Turn off all caching
			this.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);

			// Continue standard processing
			base.OnLoad(e);
		}
	}
}
